/*
 *  Items.h
 *  SquirrelAdven
 *
 *  Created by James Weaver on 3/15/11.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */

#include <string>
#include "Wm5WindowApplication3.h"

using namespace Wm5;

class Items{
protected:
	int itemID;
	std::string itemTitle;
	int itemType;
	
	std::string objFilename;
	std::string wmtfFilename;
	
	TriMesh * itemMesh;
	
	// translate
	float t_x, t_y, t_z;
	
	// for collision detection
	Float3 centerPoint;
	float len_x, len_y, len_z;
	float radius;
	
public:
	// constructor
	Items();
	// destructor
	~Items();
	
	// compute bounding box
	void computeBoundingBox();
	
	// get TriMesh of the Item
	TriMesh * getItemMesh();
	
	// setter
	void setItemID(int ID);
	void setItemTitle(std::string title);
	void setItemType(int type);
	void setObjFilename(std::string objFilename);
	void setWmtfFilename(std::string wmtfFilename);
	void setTranslate(float x, float y, float z);
	
	// getter
	int getItemID();
	std::string getItemTitle();
	int getItemType();
	
	float getLengthX();
	float getLengthY();
	float getLengthZ();
	
	float getTranslateX();
	float getTranslateY();
	float getTranslateZ();
	
	// bounding cylinder
	float getRadius();
	Float3 getCenterPoint();
	void modifyRadius(APoint scale_p);
	void modifyCenterPoint(APoint translate_p);
	
	
	// print
	void printData();
};
